<template>
    <div class="one" style="width:1030px;margin:0 auto">
        <el-main id="main" style="text-align:left">
            <h2 style="text-align:center">行政事业单位主要经济指标</h2>
            <div style="text-align:right">
                <p>表号：711—3表</p>
                <p>制定机关：国家统计局国务院经济普查办公室</p>
                <p>文号：国统字（2018）号</p>
                <p>有效期至：2019年6月</p>
            </div>
            <div>
                <p>组织机构代码:&nbsp;{{organizationCode}}</p>
                <p>统一社会信用代码:&nbsp;{{socialCreditCode}}</p>
                <p>单位详细名称:&nbsp;{{unitDetailedName}}</p>
            </div>
             <el-form ref="form" :rules="rules" :model="form"   style="text-align:left">
                <el-form-item>
                     <p style="text-align:center"><b>一、主要经济指标</b></p>
                    <table style="text-align:center;margin-top:5px;">
                        <thead>
                            <tr>
                                <th class="bian" style="width:450px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center" >计量单位</th>
                                <th class="bian" style="width:100px;text-align:center">代码</th>
                                <th class="bian" style="width:200px;text-align:center">本年</th>
                                <th class="doubling" style="width:450px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center" >计量单位</th>
                                <th class="bian" style="width:100px;text-align:center">代码</th>
                                <th  style="width:200px;text-align:center">本年</th>
                            </tr>
                        </thead>
                        <tbody >
                            <tr>
                                <td class="bian">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td class="bian">1</td>
                                <td class="doubling" style="text-align:center">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td>1</td>
                            </tr>
                            <tr>
                                <td class="bbb">流动资产合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">01</td>
                                <td class="bian">
                                     <el-form-item prop="totalCurrentAssets">
                                        <input type="text" name="" v-model="form.totalCurrentAssets"  @keyup="testMoney(form.totalCurrentAssets,'totalCurrentAssets')">
                                        <div class="red" v-show="saveData.totalCurrentAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">本年收入合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">18</td>
                                <td>
                                     <el-form-item prop="totalIncome">
                                        <input type="text" name="" v-model="form.totalIncome"  @keyup="testMoney(form.totalIncome,'totalIncome')">
                                        <div class="red" v-show="saveData.totalIncome">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;其中：存货</td>
                                <td class="bian">千元</td>
                                <td class="bian">02</td>
                                <td class="bian">
                                     <el-form-item prop="stock">
                                        <input type="text" name="" v-model="form.stock"  @keyup="testMoney(form.stock,'stock')">
                                        <div class="red" v-show="saveData.stock">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;财政拨款</td>
                                <td class="bian">千元</td>
                                <td class="bian">19</td>
                                <td>
                                     <el-form-item prop="financialAppropriation">
                                        <input type="text" name="" v-model="form.financialAppropriation"  @keyup="testMoney(form.financialAppropriation,'financialAppropriation')">
                                        <div class="red" v-show="saveData.financialAppropriation">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">长期投资</td>
                                <td class="bian">千元</td>
                                <td class="bian">03</td>
                                <td class="bian">
                                     <el-form-item prop="longTermInvestment">
                                        <input type="text" name="" v-model="form.longTermInvestment"  @keyup="testMoney(form.longTermInvestment,'longTermInvestment')">
                                        <div class="red" v-show="saveData.longTermInvestment">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;事业收入</td>
                                <td class="bian">千元</td>
                                <td class="bian">20</td>
                                <td>
                                     <el-form-item prop="causeIncome">
                                        <input type="text" name="" v-model="form.causeIncome"  @keyup="testMoney(form.causeIncome,'causeIncome')">
                                        <div class="red" v-show="saveData.causeIncome">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">固定资产原价</td>
                                <td class="bian">千元</td>
                                <td class="bian">04</td>
                                <td class="bian">
                                     <el-form-item prop="fixedAssets">
                                        <input type="text" name="" v-model="form.fixedAssets"  @keyup="testMoney(form.fixedAssets,'fixedAssets')">
                                        <div class="red" v-show="saveData.fixedAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;经营收入</td>
                                <td class="bian">千元</td>
                                <td class="bian">21</td>
                                <td>
                                     <el-form-item prop="operatingIncome">
                                        <input type="text" name="" v-model="form.operatingIncome"  @keyup="testMoney(form.operatingIncome,'operatingIncome')">
                                        <div class="red" v-show="saveData.operatingIncome">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中：房屋和构筑物</td>
                                <td class="bian">千元</td>
                                <td class="bian">05</td>
                                <td class="bian">
                                     <el-form-item prop="housesStructures">
                                        <input type="text" name="" v-model="form.housesStructures"  @keyup="testMoney(form.housesStructures,'housesStructures')">
                                        <div class="red" v-show="saveData.housesStructures">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">本年收入合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">22</td>
                                <td>
                                    <el-form-item prop="totalExpenditure">
                                        <input type="text" name="" v-model="form.totalExpenditure"  @keyup="testMoney(form.totalExpenditure,'totalExpenditure')">
                                        <div class="red" v-show="saveData.totalExpenditure">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机器设备</td>
                                <td class="bian">千元</td>
                                <td class="bian">06</td>
                                <td class="bian">
                                     <el-form-item prop="machineryEquipment">
                                        <input type="text" name="" v-model="form.machineryEquipment"  @keyup="testMoney(form.machineryEquipment,'machineryEquipment')">
                                        <div class="red" v-show="saveData.machineryEquipment">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;工资福利支出</td>
                                <td class="bian">千元</td>
                                <td class="bian">23</td>
                                <td>
                                     <el-form-item prop="welfareExpenditure">
                                        <input type="text" name="" v-model="form.welfareExpenditure"  @keyup="testMoney(form.welfareExpenditure,'welfareExpenditure')">
                                        <div class="red" v-show="saveData.welfareExpenditure">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;运输工具</td>
                                <td class="bian">千元</td>
                                <td class="bian">07</td>
                                <td class="bian">
                                     <el-form-item prop="conveyance">
                                        <input type="text" name="" v-model="form.conveyance"  @keyup="testMoney(form.conveyance,'conveyance')">
                                        <div class="red" v-show="saveData.conveyance">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;商品和服务支出</td>
                                <td class="bian">千元</td>
                                <td class="bian">24</td>
                                <td>
                                     <el-form-item prop="serviceExpenditure">
                                        <input type="text" name="" v-model="form.serviceExpenditure"  @keyup="testMoney(form.serviceExpenditure,'serviceExpenditure')">
                                        <div class="red" v-show="saveData.serviceExpenditure">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                    </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电子设备</td>
                                <td class="bian">千元</td>
                                <td class="bian">08</td>
                                <td class="bian">
                                     <el-form-item prop="electronicEquipment">
                                        <input type="text" name="" v-model="form.electronicEquipment"  @keyup="testMoney(form.electronicEquipment,'electronicEquipment')">
                                        <div class="red" v-show="saveData.electronicEquipment">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                    </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;对个人和家庭的补助</td>
                                <td class="bian">千元</td>
                                <td class="bian">25</td>
                                <td>
                                     <el-form-item prop="subsidy">
                                        <input type="text" name="" v-model="form.subsidy"  @keyup="testMoney(form.subsidy,'subsidy')">
                                        <div class="red" v-show="saveData.subsidy">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">在建工程</td>
                                <td class="bian">千元</td>
                                <td class="bian">212</td>
                                <td class="bian">
                                     <el-form-item prop="constructionProject">
                                        <input type="text" name="" v-model="form.constructionProject"  @keyup="testMoney(form.constructionProject,'constructionProject')">
                                        <div class="red" v-show="saveData.constructionProject">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中：退职（役）费</td>
                                <td class="bian">千元</td>
                                <td class="bian">26</td>
                                <td>
                                     <el-form-item prop="retired">
                                        <input type="text" name="" v-model="form.retired"  @keyup="testMoney(form.retired,'retired')">
                                        <div class="red" v-show="saveData.retired">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">无形资产原价</td>
                                <td class="bian">千元</td>
                                <td class="bian">10</td>
                                <td class="bian">
                                     <el-form-item prop="intangibleAssets">
                                        <input type="text" name="" v-model="form.intangibleAssets"  @keyup="testMoney(form.intangibleAssets,'intangibleAssets')">
                                        <div class="red" v-show="saveData.intangibleAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;经营支出</td>
                                <td class="bian">千元</td>
                                <td class="bian">27</td>
                                <td>
                                     <el-form-item prop="operatingExpenses">
                                        <input type="text" name="" v-model="form.operatingExpenses"  @keyup="testMoney(form.operatingExpenses,'operatingExpenses')">
                                        <div class="red" v-show="saveData.operatingExpenses">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;其中：土地使用权</td>
                                <td class="bian">千元</td>
                                <td class="bian">11</td>
                                <td class="bian">
                                     <el-form-item prop="landUseRight">
                                        <input type="text" name="" v-model="form.landUseRight"  @keyup="testMoney(form.landUseRight,'landUseRight')">
                                        <div class="red" v-show="saveData.landUseRight">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;销售税金</td>
                                <td class="bian">千元</td>
                                <td class="bian">28</td>
                                <td>
                                     <el-form-item prop="taxOnSales">
                                        <input type="text" name="" v-model="form.taxOnSales"  @keyup="testMoney(form.taxOnSales,'taxOnSales')">
                                        <div class="red" v-show="saveData.taxOnSales">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;软件使用权</td>
                                <td class="bian">千元</td>
                                <td class="bian">12</td>
                                <td class="bian">
                                     <el-form-item prop="softwareUseRight">
                                        <input type="text" name="" v-model="form.softwareUseRight"  @keyup="testMoney(form.softwareUseRight,'softwareUseRight')">
                                        <div class="red" v-show="saveData.softwareUseRight">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bbb">公共基础设施原价</td>
                                <td class="bian">千元</td>
                                <td class="bian">13</td>
                                <td class="bian">
                                     <el-form-item prop="publicInfrastructure">
                                        <input type="text" name="" v-model="form.publicInfrastructure"  @keyup="testMoney(form.publicInfrastructure,'publicInfrastructure')">
                                        <div class="red" v-show="saveData.publicInfrastructure">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bbb">公共基础设施累计折旧</td>
                               <td class="bian">千元</td>
                                <td class="bian">14</td>
                                <td class="bian">
                                     <el-form-item prop="publicInfrastructureDepreciation">
                                        <input type="text" name="" v-model="form.publicInfrastructureDepreciation"  @keyup="testMoney(form.publicInfrastructureDepreciation,'publicInfrastructureDepreciation')">
                                        <div class="red" v-show="saveData.publicInfrastructureDepreciation">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bbb">资产总计</td>
                                <td class="bian">千元</td>
                                <td class="bian">15</td>
                                <td class="bian">
                                     <el-form-item prop="totalAssets">
                                        <input type="text" name="" v-model="form.totalAssets"  @keyup="testMoney(form.totalAssets,'totalAssets')">
                                        <div class="red" v-show="saveData.totalAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                 </td>
                                <td class="doubling"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bbb">负债合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">16</td>
                                <td class="bian">
                                     <el-form-item prop="totalDebt">
                                        <input type="text" name="" v-model="form.totalDebt"  @keyup="testMoney(form.totalDebt,'totalDebt')">
                                        <div class="red" v-show="saveData.totalDebt">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bbb">净资产合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">17</td>
                                <td class="bian">
                                     <el-form-item prop="totalNetAssets">
                                        <input type="text" name="" v-model="form.totalNetAssets"  @keyup="testMoney(form.totalNetAssets,'totalNetAssets')">
                                        <div class="red" v-show="saveData.totalNetAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td></td>
                            </tr>
                        </tbody>
                    </table>
                    <p style="text-align:center"><b>二、从业人员及工资总额</b></p>
                    <table style="text-align:center;margin-top:5px;">
                        <thead>
                            <tr>
                                <th class="bian" style="width:400px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center">计量单位</th>
                                <th  class="bian" style="width:100px;text-align:center">代码</th>
                                <th  style="width:300px;text-align:center">本年</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td class="bian">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td >1</td>
                            </tr>
                            <tr>
                                <td class="bian">一、从业人员</td>
                                <td class="bian">-</td>
                                <td class="bian">-</td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从业人员期末人数</td>
                                <td class="bian">人</td>
                                <td class="bian">01</td>
                                <td>
                                     <el-form-item prop="finalEmployeesNumber">
                                        <input type="text" name="" v-model="form.finalEmployeesNumber"  @keyup="testPeople(form.finalEmployeesNumber,'finalEmployeesNumber')">
                                        <div class="red" v-show="saveData.finalEmployeesNumber">请输入正整数</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中:女性</td>
                                <td class="bian">人</td>
                                <td class="bian">02</td>
                                <td>
                                     <el-form-item prop="femaleNumber">
                                        <input type="text" name="" v-model="form.femaleNumber"  @keyup="testPeople(form.femaleNumber,'femaleNumber')">
                                        <div class="red" v-show="saveData.femaleNumber">请输入正整数</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从业人员平均人数</td>
                                <td class="bian">人</td>
                                <td class="bian">03</td>
                                <td>
                                     <el-form-item prop="averageEmployeesNumber">
                                        <input type="text" name="" v-model="form.averageEmployeesNumber"  @keyup="testPeople(form.averageEmployeesNumber,'averageEmployeesNumber')">
                                        <div class="red" v-show="saveData.averageEmployeesNumber">请输入正整数</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bian">二、工资总额</td>
                                <td class="bian">-</td>
                                <td class="bian">-</td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从业人员工资总额</td>
                                <td class="bian">千元</td>
                                <td class="bian">04</td>
                                <td>
                                     <el-form-item prop="totalWages">
                                        <input type="text" name="" v-model="form.totalWages"  @keyup="testMoney(form.totalWages,'totalWages')" @blur="testReason(form.totalWages)">
                                        <div class="red" v-show="saveData.totalWages">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </el-form-item>
                <div v-show="totalReason">
                <h4>补充资料：</h4>  
                 <el-form-item prop="reason">
                    <p>&nbsp;&nbsp;1.无法填报“从业人员工资总额”数据的原因：</p> 
                    <el-radio-group v-model="form.reason" @change="sourceFilter">
                        <el-radio :label="1" name="reason"  style="margin-left:30px;">（1）本单位无生产经营活动。</el-radio><br>
                        <el-radio :label="2" name="reason" style="margin-left:30px;">（2）本单位不独立核算，工资有上级单位发放。</el-radio><br>
                        <el-radio :label="3" name="reason" style="margin-left:30px;">（3）本单位一套人马多块牌子，工资已在另一家单位统计。</el-radio><br>
                        <el-radio :label="4" name="reason" style="margin-left:30px;">（4）本单位属于单位内部性组织、互助性组织或非经营性组织，没有工资发放。</el-radio><br>
                        <el-radio :label="5" name="reason" style="margin-left:30px;">（5）本单位为没有雇员的家庭经营单位，没有工资发放。</el-radio><br>
                        <el-radio :label="6" name="reason" style="margin-left:30px;">（6）其他原因</el-radio>
                    </el-radio-group>
                    <div class="red" v-show="saveData.reason">请选择无法填报“从业人员工资总额”数据的原因</div>
                </el-form-item>
                <div  v-show="one">
                        <p>&nbsp;&nbsp;2.原因为(2)、(3)的单位填报</p>
                    <el-form-item prop="upOrganizationCode"> 
                        发放工资的法人单位：&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;组织机构代码：<el-input  class="width400" v-model="form.upOrganizationCode" @keyup.native="testEln(form.upOrganizationCode,'upOrganizationCode')"></el-input>
                        <div style="margin-left:270px;" class="red" v-show="saveData.upOrganizationCode">请输入数字或英文</div>
                    <div style="margin-left:270px;" class="red" v-show="showupSocialCreditCode">请输入统一社会信用代码或组织机构代码至少一项</div> 
                    </el-form-item> 
                    <el-form-item prop="upSocialCreditCode">
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        统一社会信用代码： <el-input  class="width400" v-model="form.upSocialCreditCode" @keyup.native="testEln(form.upSocialCreditCode,'upSocialCreditCode')"></el-input>    
                        <div style="margin-left:270px;" class="red" v-show="saveData.upSocialCreditCode">请输入数字或英文</div>
                        <div style="margin-left:270px;" class="red" v-show="showupSocialCreditCode">请输入统一社会信用代码或组织机构代码至少一项</div>
                    </el-form-item>
                    <el-form-item prop="upUnitDetailedName">
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        单位详细名称：<el-input class="width400" v-model="form.upUnitDetailedName"></el-input>    
                        <div style="margin-left:270px;" class="red" v-show="saveData.upUnitDetailedName">请输入汉字或英文</div>
                        <div style="margin-left:270px;" class="red" v-show="showupUnitDetailedName">请输入单位详细名称</div>
                    </el-form-item>
                </div>
                </div>
                <el-form-item>
                    <p style="text-align:center"><b>三、电子商务交易情况</b></p>
                    <table style="text-align:center;margin-top:5px;">
                        <thead>
                             <tr>
                                <th class="bian" style="width:400px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center">计量单位</th>
                                <th  class="bian" style="width:100px;text-align:center">代码</th>
                                <th  style="width:300px;text-align:center">本年</th>
                            </tr>
                        </thead>
                        <tbody>
                             <tr>
                                <td class="bian">电子商务采购额</td>
                                <td class="bian">千元</td>
                                <td class="bian">01</td>
                                <td>
                                    <el-form-item prop="eBusinessProcurement">
                                        <input type="text" name="" v-model="form.eBusinessProcurement"  @keyup="testMoney(form.eBusinessProcurement,'eBusinessProcurement')">
                                        <div class="red" v-show="saveData.eBusinessProcurement">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </el-form-item>
                <el-form-item>
                    <span style="font-size:8px">单位负责人：</span>
                    <el-input style="width:100px" v-model="form.unitHead"></el-input>
                    <span style="font-size:8px">统计负责人：</span>
                    <el-input style="width:100px" v-model="form.statisticalControlOfficer"></el-input>
                    <span style="font-size:8px">填表人：</span>
                    <el-input style="width:100px" v-model="form.fillFormBy"></el-input>
                    <span style="font-size:8px">联系电话：</span>
                    <el-input style="width:120px" v-model="form.phone"></el-input>
                    <span style="font-size:8px">出报日期：</span>
                    <el-date-picker  v-model="form.createTime" class="width100 marginBottom"    type="date"  placeholder="选择日期"> </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <div>
                        <p>说明：1.统计范围：辖区内执行行政单位、事业单位会计制度和其他会计制度的法人单位。</p>
                        <p>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;2.报送日期及方式：2019年4月30日前通过非一套表单位采集处理软件或手持电子终端设备采集数据。</p>
                        <p>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;3.审核关系：</p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            资产负债:
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （1）固定资产净值=房屋和构筑物（净值）+机器设备（净值）+运输工具（净值）+电子设备（净值）+其他（净值）
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （2）固定资产原价=房屋和构筑物（原价）+机器设备（原价）+运输工具（原价）+电子设备（原价）+其他（原价）
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （3）无形资产净值=土地使用权+软件使用权+其他
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （4）净资产合计=资产合计-负债合计
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            财务状况:
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （1）本年收入合计≥财政拨款+事业收入+经营收入
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （2）本年支出合计≥工资福利支出+商品和服务支出+对个人和家庭的补助
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （3）商品和服务支出≥取暖费（降温费）+劳务费+差旅费+因公出国（境）费用+工会经费+福利费
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （4）对个人和家庭的补助≥抚恤金+生活补助+救济费+助学金+退职（役）费
                        </p>
                    </div>
                </el-form-item>
            </el-form>
        </el-main>
        <div slot="footer" class="dialog-footer"> 
            <el-button type="primary" @click="saveFormthere">暂存</el-button>
            <el-button type="success" @click="submitFormthere('form')">提交</el-button> 
            <el-button type="danger" @click="download">下载PDF表格</el-button>  
        </div>
    </div>
</template>
<script>
import axios from 'axios';
  
export default {
    name:'App',
    data(){
        return{
            one:false,
            organizationCode:this.$store.get('organizationCode'),//组织机构代码
            socialCreditCode:this.$store.get('socialCreditCode'),//统一社会信用代码
            unitDetailedName:this.$store.get('unitDetailedName'),//单位详细名称
            totalReason:true,//不填写总额原因
            showupUnitDetailedName:false,
            showupSocialCreditCode:false,
            form:{
                totalCurrentAssets:'',//(01)流动资产合计 千元
                stock:'',//(02)其中：存货 千元
                longTermInvestment:'',//(03)长期投资 千元
                fixedAssets:'',//(04)固定资产原价 千元
                housesStructures:'',//(05)其中：房屋和构筑物 千元
                machineryEquipment:'',//(06)机器设备 千元
                conveyance:'',//(07)运输工具 千元
                electronicEquipment:'',//(08)电子设备 千元
                constructionProject:'',//(212)在建工程 千元
                intangibleAssets:'',//(10)无形资产原价 千元
                landUseRight:'',//(11)其中：土地使用权 千元
                softwareUseRight:'',//(12)软件使用权 千元
                publicInfrastructure:'',//(13)公共基础设施原价 千元
                publicInfrastructureDepreciation:'',//(14)公共基础设施累计折旧 千元
                totalAssets:'',//(15)资产总计 千元
                totalDebt:'',//(16)负债合计 千元
                totalNetAssets:'',//(17)净资产合计 千元
                totalIncome:'',//(18)本年收入合计 千元
                financialAppropriation:'',//(19)财政拨款 千元
                causeIncome:'',//(20)事业收入 千元
                operatingIncome:'',//(21)经营收入 千元
                totalExpenditure:'',//(22)本年支出合计 千元
                welfareExpenditure:'',//(23)工资福利支出 千元
                serviceExpenditure:'',//(24)商品和服务支出 千元
                subsidy:'',//(25)对个人和家庭的补助 千元
                retired:'',//(26)其中：退职（役） 千元
                operatingExpenses:'',//(27)经营支出 千元
                taxOnSales:'',//(28)销售税金 千元

                finalEmployeesNumber:'',//(01)从业人员期末人数
                femaleNumber:'',//(02)其中：女性人数
                averageEmployeesNumber:'',//(03)从业人员平均人数
                totalWages:'',//(04)从业人员工资总额
                reason:'',//1.无法填报“从业人员工资总额”数据的原因
                upOrganizationCode:'',//组织机构代码  发放工资的法人单位
                upSocialCreditCode:'',//统一社会信用代码 发放工资的法人单位
                upUnitDetailedName:'',//单位详细名称 发放工资的法人单位

                eBusinessProcurement:'',//(01)电子商务采购额  千元
                


                unitHead:'',//单位负责人
                statisticalControlOfficer:'',//统计负责人
                fillFormBy:'',//填表人
                phone:'',//联系电话
                createTime:'',//填表时间
            },
            saveData:{
                totalCurrentAssets:false,//(01)流动资产合计 千元
                stock:false,//(02)其中：存货 千元
                longTermInvestment:false,//(03)长期投资 千元
                fixedAssets:false,//(04)固定资产原价 千元
                housesStructures:false,//(05)其中：房屋和构筑物 千元
                machineryEquipment:false,//(06)机器设备 千元
                conveyance:false,//(07)运输工具 千元
                electronicEquipment:false,//(08)电子设备 千元
                constructionProject:false,//(212)在建工程 千元
                intangibleAssets:false,//(10)无形资产原价 千元
                landUseRight:false,//(11)其中：土地使用权 千元
                softwareUseRight:false,//(12)软件使用权 千元
                publicInfrastructure:false,//(13)公共基础设施原价 千元
                publicInfrastructureDepreciation:false,//(14)公共基础设施累计折旧 千元
                totalAssets:false,//(15)资产总计 千元
                totalDebt:false,//(16)负债合计 千元
                totalNetAssets:false,//(17)净资产合计 千元
                totalIncome:false,//(18)本年收入合计 千元
                financialAppropriation:false,//(19)财政拨款 千元
                causeIncome:false,//(20)事业收入 千元
                operatingIncome:false,//(21)经营收入 千元
                totalExpenditure:false,//(22)本年支出合计 千元
                welfareExpenditure:false,//(23)工资福利支出 千元
                serviceExpenditure:false,//(24)商品和服务支出 千元
                subsidy:false,//(25)对个人和家庭的补助 千元
                retired:false,//(26)其中：退职（役） 千元
                operatingExpenses:false,//(27)经营支出 千元
                taxOnSales:false,//(28)销售税金 千元

                finalEmployeesNumber:false,//(01)从业人员期末人数
                femaleNumber:false,//(02)其中：女性人数
                averageEmployeesNumber:false,//(03)从业人员平均人数
                totalWages:false,//(04)从业人员工资总额
                reason:false,//1.无法填报“从业人员工资总额”数据的原因
                upOrganizationCode:false,//组织机构代码  发放工资的法人单位
                upSocialCreditCode:false,//统一社会信用代码 发放工资的法人单位
                upUnitDetailedName:false,//单位详细名称 发放工资的法人单位

                eBusinessProcurement:false,//(01)电子商务采购额  千元
                


                //unitHead:false,//单位负责人
                //statisticalControlOfficer:false,//统计负责人
                //fillFormBy:false,//填表人
                //phone:false,//联系电话
                //createTime:false,//填表时间
            },
            //rules: {
                // upOrganizationCode:[
                // { required: true, message: '请输入发放工资的法人单位组织机构代码', trigger: 'blur' },
                // { min: 9, max: 9, message: '长度为9个字符', trigger: 'blur' } 
                // ],
                //  upSocialCreditCode:[
                // { required: true, message: '请输入发放工资的法人单位统一社会信用代码', trigger: 'blur' },
                // { min: 18, max: 18, message: '长度为18个字符', trigger: 'blur' } 
                // ],
                // upUnitDetailedName: [
                // { required: true, message: '请输入发放工资的法人单位单位全称', trigger: 'blur' },
                // { min: 5, max: 30, message: '长度在 5 到 30 个字符', trigger: 'blur' }
                // ]
            //}
             rules: {
                totalCurrentAssets: [
                    { required: true, message: '请输入流动资产合计', trigger: 'none' },
                ],
                stock: [
                    { required: true, message: '请输入其中：存货', trigger: 'none' },
                ],
                longTermInvestment: [
                    { required: true, message: '请输入长期投资', trigger: 'none' },
                ],
                fixedAssets: [
                    { required: true, message: '请输入固定资产原价', trigger: 'none' },
                ],
                housesStructures: [
                    { required: true, message: '请输入其中：房屋和构筑物', trigger: 'none' },
                ],
                machineryEquipment: [
                    { required: true, message: '请输入机器设备', trigger: 'none' },
                ],
                conveyance: [
                    { required: true, message: '请输入运输工具', trigger: 'none' },
                ],
                electronicEquipment: [
                    { required: true, message: '请输入电子设备', trigger: 'none' },
                ],
                constructionProject: [
                    { required: true, message: '请输入在建工程', trigger: 'none' },
                ],
                intangibleAssets: [
                    { required: true, message: '请输入无形资产原价', trigger: 'none' },
                ],
                landUseRight: [
                    { required: true, message: '请输入其中：土地使用权', trigger: 'none' },
                ],
                softwareUseRight: [
                    { required: true, message: '请输入软件使用权', trigger: 'none' },
                ],
                publicInfrastructure: [
                    { required: true, message: '请输入公共基础设施原价', trigger: 'none' },
                ],
                publicInfrastructureDepreciation: [
                    { required: true, message: '请输入公共基础设施累计折旧', trigger: 'none' },
                ],
                totalAssets: [
                    { required: true, message: '请输入资产总计', trigger: 'none' },
                ],
                totalDebt: [
                    { required: true, message: '请输入负债合计', trigger: 'none' },
                ],
                totalNetAssets: [
                    { required: true, message: '请输入净资产合计', trigger: 'none' },
                ],
                totalIncome: [
                    { required: true, message: '请输入本年收入合计', trigger: 'none' },
                ],
                financialAppropriation: [
                    { required: true, message: '请输入财政拨款', trigger: 'none' },
                ],
                causeIncome: [
                    { required: true, message: '请输入事业收入', trigger: 'none' },
                ],
                operatingIncome: [
                    { required: true, message: '请输入经营收入', trigger: 'none' },
                ],
                totalExpenditure: [
                    { required: true, message: '请输入本年支出合计', trigger: 'none' },
                ],
                welfareExpenditure: [
                    { required: true, message: '请输入工资福利支出', trigger: 'none' },
                ],
                // reason: [
                //     { required: true, message: '请选择无法填报“从业人员工资总额”数据的原因', trigger: 'none' },
                // ],
                // upOrganizationCode: [
                //     { required: true, message: '请输入组织机构代码', trigger: 'none' },
                // ],
                // upSocialCreditCode: [
                //     { required: true, message: '请输入统一社会信用代码', trigger: 'none' },
                // ],
                // upUnitDetailedName: [
                //     { required: true, message: '请输入单位详细名称', trigger: 'none' },
                // ],
                serviceExpenditure: [
                    { required: true, message: '请输入商品和服务支出', trigger: 'none' },
                ],
                subsidy: [
                    { required: true, message: '请输入对个人和家庭的补助', trigger: 'none' },
                ],
                retired: [
                    { required: true, message: '请输入其中：退职（役）', trigger: 'none' },
                ],
                operatingExpenses: [
                    { required: true, message: '请输入经营支出', trigger: 'none' },
                ],
                taxOnSales: [
                    { required: true, message: '请输入销售税金', trigger: 'none' },
                ],
                finalEmployeesNumber: [
                    { required: true, message: '请输入从业人员期末人数', trigger: 'none' },
                ],
                femaleNumber: [
                    { required: true, message: '请输入其中：女性人数', trigger: 'none' },
                ],
                averageEmployeesNumber: [
                    { required: true, message: '请输入从业人员平均人数', trigger: 'none' },
                ],
                // totalWages: [
                //     { required: true, message: '请输入从业人员工资总额', trigger: 'none' },
                // ],
                eBusinessProcurement: [
                    { required: true, message: '请输入电子商务采购额', trigger: 'none' },
                ],
             },
        }
    },
     mounted:function(){
        this.getDate();
    },
    methods:{
        // 回显数据
        getDate(){
            let self =this;
            let baseId=this.$store.get("companyId");
            console.log(baseId);
            this.$http({
                mothod:'get',
                url:'711Three/get?baseId='+baseId,
            }).then(function(res){
                console.log(res);
                console.log(res.data.data.length);
                if(res.status===200){
                    if(res.data.status===401){
                        self.$message.error("请先登录！");
                        self.$router.push({ path: '/' });
                        return;
                    }
                    if(res.data.data.length===0){
                        self.id =null;
                    }else{
                         if(res.data.data[0].totalWages || res.data.data[0].totalWages === 0){
                            self.totalReason = false;
                        }else{
                            self.totalReason = true;
                        }
                        self.form = res.data.data[0];
                        self.id = res.data.data[0].id;
                        self.sourceFilter(res.data.data[0].reason)
                        // self.form.updateTime = res.data[0].newupdateTime;
                    }
                }else{
                    self.$message.error(res.message);
                }
            }).catch(function(err){
                console.log(err)
            })
        },
        submitFormthere(formName){
           console.log(this.form.totalWages==='0');
            console.log(this.form.totalWages);
            //判断合法输入
            if(this.form.totalWages || this.form.totalWages==='0'){
                console.log(1);
                this.saveData.reason = false;
                this.form.reason = null;
            }
            if(this.form.reason){
                this.saveData.reason = false;
            }
            if(this.form.reason!=2 && this.form.reason!=3){
                console.log(2);
                this.saveData.upOrganizationCode = false;
                this.saveData.upSocialCreditCode = false;
                this.saveData.upUnitDetailedName = false;
                this.form.upOrganizationCode = null;
                this.form.upSocialCreditCode = null;
                this.form.upUnitDetailedName = null;
            }
            for(var k in this.saveData){
                if(this.saveData[k] === true){
                    return;
                }
            }
            //判断必填
            if(!this.form.totalWages && this.form.totalWages!='0'){
                if(!this.form.reason){
                    this.saveData.reason = true;
                    return;
                }
            }
            if(this.form.reason===2 || this.form.reason===3){
                console.log(1111111);
                if(!this.form.upUnitDetailedName && this.form.upUnitDetailedName!='0'){
                    this.showupUnitDetailedName = true;
                    console.log(12);
                    return;
                }else if(!this.form.upSocialCreditCode && this.form.upSocialCreditCode!='0'){
                    if(!this.form.upOrganizationCode && this.form.upOrganizationCode!='0'){
                        this.showupSocialCreditCode = true;
                        console.log(1222);
                        return;
                    }
                }
            }
            this.$refs[formName].validate((valid) => {
                if (valid) {
                let self = this;
                let data = this.form;
                data.baseId= this.$store.get("companyId");
                data.id=this.id;
                data.state = 1;
                console.log(data);
                this.$http({
                    method:'post',
                    url:'711Three/insertOrUpdate',
                    data:data,
                }).then(function(res){
                    console.log(res);
                    if(res.status === 200){
                        self.$message.success(res.data.message);
                        self.formData = res.data.data;
                        self.formData.updateTime = res.data.data.newupdateTime;
                        self.$router.push({ path: '/home' })
                    }else{
                        self.$message.error(res.data.message);
                    }
                }).catch(function(err){
                    console.log(err);
                    
                })
                } else {
                    return false;
                }
                });
        },
        sourceFilter(label){
            console.log(label);
            if(label ===2 || label===3){
                this.one = true;
            }else{
                this.one = false;
            }
        },
        //暂存
        saveFormthere(){
             //判断合法输入
            if(this.form.totalWages || this.form.totalWages=== 0){
                this.saveData.reason = false;
                this.form.reason = null;

            }
            if(this.form.reason!=2 && this.form.reason!=3){
                this.saveData.upOrganizationCode = false;
                this.saveData.upSocialCreditCode = false;
                this.saveData.upUnitDetailedName = false;
                this.form.upOrganizationCode = null;
                this.form.upSocialCreditCode = null;
                this.form.upUnitDetailedName = null;
            }
            for(var k in this.saveData){
            if(this.saveData[k] === true){
                return;
            }
            }
            let self = this;
            let data = this.form;
            data.baseId= this.$store.get("companyId");
            data.id=this.id;
            data.state = 0;
            console.log(data);

            this.$http({
                method:'post',
                url:'711Three/insertOrUpdate',
                data:data,
            }).then(function(res){
                console.log(res);
                 if(res.status === 200){
                    self.$message.success(res.data.message);
                    self.formData = res.data.data;
                    self.formData.updateTime = res.data.data.newupdateTime;
                    self.$router.push({ path: '/home' })
                }else{
                    self.$message.error(res.data.message);
                }
            }).catch(function(err){
                console.log(err);
                
            })
        },
         //下载pdf
        download(){
            let self = this;
            let data = this.form;
            console.log(data.state);
            if(data.state === 2){
                console.log(555555555555555555);
                //  let url = 'http://192.168.0.131:8001/register/711Base/downLoad?baseId='+this.$store.get("companyId");
            let url = this.$downloadUrl+'/711Three/downLoad?baseId='+this.$store.get("companyId");
            window.location.href=url;
            }else{
                this.$message.error('有未提交表不能下载');
            }
        },
         //检验输入金额
        testMoney(value,data){
            // let reg = /^(\-|\+?)(\d{1,11})+([.]{1}[0-9]{0,5})?$/;
            let reg =  /^(\-|\+?)\d{1,15}(\.\d{1,5})?$/;
            if(!reg.test(value) && value){
                for(var r in this.saveData){
                if(r === data){
                    this.saveData[r] = true;
                }
                }
            }else if(reg.test(value) || !value){
                for(var rs in this.saveData){
                if(rs === data){
                    this.saveData[rs] = false;
                }
                }
            }
        },
        //检验输入人数
        testPeople(value,data){
            let reg = /^(\d{1,11})$/;
            if(!reg.test(value) && value){
                for(var r in this.saveData){
                if(r === data){
                    this.saveData[r] = true;
                }
                }
            }else if(reg.test(value) || !value){
                for(var rs in this.saveData){
                if(rs === data){
                    this.saveData[rs] = false;
                }
                }
            }
        },
         //检验组织机构代码，社会信用代码
        testEln(value,data){
            console.log("1111");
            let reg = /^[a-zA-Z0-9]*$/;
            if(!reg.test(value) && value){
                    this.saveData[data] = true;
            }else if(reg.test(value) || !value){
                    this.saveData[data] = false;
            }
        },
        // 检验是否填总额原因
        testReason(value){
            console.log(value);
            if(value || value === 0){
                this.totalReason = false;
            }else{
                this.totalReason = true;
            }
        },
    }          
}
</script>
<style scoped>
     #main input{
        border:0px solid #dcdfe6;
        border-bottom: 1px solid #1d1e20;
        border-radius: 0;
   
    }
    .width400{
        width: 400px;
    }
     #main table tr,#main table td,#main table th{
        /* border-right: 1px solid #ddd; */
        /* border-left: 1px solid #ddd; */
        border-bottom: 1px solid #DDD;
        border-top: 1px solid #DDD;
    }
    .bian{
        border-right: 1px solid #ddd;
    }
    .dialog-footer{
        text-align: center
    }
    .doubling{
        border-right: 1px solid #ddd;
        border-left: 1px solid #ddd;
        text-align: left;
    }
    .bbb{
        text-align: left;
        border-right: 1px solid #ddd;
    }
</style>

